package cn.itcast.bos.web.action.trantis;

import cn.itcast.bos.domain.transit.InOutStorageInfo;
import cn.itcast.bos.service.trantis.InOutStorageInfoService;
import cn.itcast.bos.utils.BaseAction;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

@Namespace("/")
@ParentPackage("json-default")
@Scope("protoType")
@Controller
public class InOutStorageInfoAction extends BaseAction<InOutStorageInfo> {
    @Autowired
    private InOutStorageInfoService inOutStorageInfoService;
    private String transitInfoId;

    public void setTransitInfoId(String transitInfoId) {
        this.transitInfoId = transitInfoId;
    }
    @Action(value = "inoutStoreageInfo_save",results = {@Result(name="success",type="redirect",location = "pages/transit/transitinfo.html")})
    public String saveInOutStorageInfo(){
        inOutStorageInfoService.save(transitInfoId,model);

        return SUCCESS;
    }
}
